﻿@using MediaGarden.Models;
@{
    /* HTML5 audio view
     * TODO: Audio player doesn't want to be displayed at same sizes as video or image views. So need a Parts_Media__Audio alternate to feed the different size in.
    */
    int width = Model.DisplayWidth;
    int height = Model.DisplayHeight;
    bool autoplay = (Model.AutoPlay==null)?false:Model.AutoPlay;
    // TODO: Support the various options of HTML5 video; loop, preload; although these can easily be set with template overrides
}
<audio src="@Model.MediaUrl" controls="controls" title="@Model.Title" autoplay="@autoplay">@* (apparently width/height aren't supported by audio tag anyway...) @if(width>0){<text> width="@width"</text>}@if(height>0){<text> height="@height"</text>}> *@
    Sorry, your browser does not support HTML5 audio
</audio>